Passed
Push — 262-fix/delete-sticky-posts ( 13b51e )
by Rajan
08:20
created

$(document).ready   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 1
b 0
f 0
1
/**
2
 * Add select2 functionality..
3
 */
4
/* global BulkWP */
5
jQuery( document ).ready( function () {
6
	/**
7
	 * Normal select2.
8
	 */
9
	jQuery( '.select2-sticky-post' ).select2( {
10
		width: '300px'
11
	} );
12
} );
13
BulkWP.validateStickyPostSelect2 = function(that) {
14
	if (null !== jQuery(that).parent().prev().children().find(".select2-sticky-post[multiple]").val()) {
15
		return true;
16
	} else {
17
		return false;
18
	}
19
};